

using System;
using System.Collections.Generic;
using System.Text;

namespace JTC.MiniCommerce.Store.Services.CouponService {

  [Serializable]
  public class PercentOffCouponProvider : ICouponProvider {
  
    #region Member Variables

    private decimal _percentOff;

    #endregion
    
    #region Properties
    
    public decimal PercentOff {
      get {
        return _percentOff;
      }
      set {
        _percentOff = value;
      }
    }
    
    #endregion

    #region ICouponProvider Members

    public void ApplyCoupon(Order order) {
      order.DiscountAmount = order.SubTotal * PercentOff;
      order.Save("CouponService");
    }

    #endregion
    
  }
}
